#!/usr/bin/env sh

# 忽略错误
set -e

# 打包组件
npm run build
cd zztech-ui

npm init -y

cd -

node sss.js

cd zztech-ui
# 发布到npm
npm publish

cd -
# 构建
npm run docs:build

# 进入待发布的目录
cd docs/.vuepress/dist

# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME

git init
git add -A
git commit -m 'deploy2' 

# 如果部署到 https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master

# 如果是部署到 https://<USERNAME>.github.io/<REPO> https://github.com/caojiaxiong/zzkjUI.git
# git push -f http://admin@192.168.50.123:9000/r/zztech-ui.git master:gh-pages 
git push -f http://192.168.50.123:9000/r/zztech-ui.git master:gh-pages
# git push -f http://admin@192.168.50.123:9000/r/zztech-ui.git master:gh-pages
# 回到之前的目录
# cd -
